home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / pctjjl86.arc / ANIMATE.ARC / DRIVCXOR.ASM < prev    next >
Assembly Source File  |  1986-04-16  |  869b  |  44 lines

  1. ; *** Listing 4 ***
  2. ;
  3. ;Assembly language subroutine for C exclusive-OR driver,
  4. ;  in format required by Mark Williams C compiler.
  5. ;Exclusive-ORs byte at color display offset.
  6. ;
  7. ; Input:
  8. ;    parm 1 - byte to exclusive-OR.
  9. ;    parm 2 - offset to exclusive-OR byte at.
  10. ;
  11. ; Output: none
  12. ;
  13. CGROUP    GROUP    CODE
  14. ;
  15. ;Parameter layout for use in addressing the 2 parameters on the stack.
  16. ;
  17. dyns    struc
  18. old_bp    dw    ?
  19. old_ds    dw    ?
  20. retn    dw    ?
  21. p1    dw    ?
  22. p2    dw    ?
  23. dyns    ends
  24. ;
  25. code    segment byte public 'CODE'
  26.     public    putbyt_
  27.     assume    cs:cgroup
  28. ;
  29. putbyt_ proc    near
  30.     push    ds
  31.     push    bp
  32.     mov    bp,sp
  33.     mov    al,byte ptr [bp].p1  ;get byte to xor into display RAM
  34.     mov    bx,0b800h
  35.     mov    ds,bx        ;point segment to color display RAM
  36.     mov    bx,[bp].p2    ;get screen offset to xor byte at
  37.     xor    [bx],al     ;xor byte into display RAM
  38.     pop    bp
  39.     pop    ds
  40.     ret
  41. putbyt_ endp
  42. code    ends
  43.     end
  44.